<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
	<title>Luxena dbExpress driver for Informix Pro manual</title>

	<meta name="Owner" content="Luxena Software Company">
	<meta name="Robots" content="ALL">
	<meta name="Copyright" content="Copyright (c) 2001-2006 Luxena Software Company">
	<meta name="Language" content="English">
	<meta http-equiv="Content-Type" content="text/html">

	<link href="styles/general.css" rel=stylesheet type="text/css">

	<base target="_blank">
</head>

<body>
	<table class="body_text" width="100%" border="0" cellpadding="1" cellspacing="0">

		<tr>
			<td class="page_caption">IInformixConnection interface</td>
			<td align="right" valign="top"><a class="index" href="../index.htm">index</a></td>
		</tr>

		<tr><td colspan="2" height="10"></td></tr>	

		<tr><td colspan="2">
			IInformixConnection is an interface that extends standard dbExpress interface ISQLConnection and
			provides access to Informix specific functionality. This interface is realized in Luxena dbExpress
			driver for Informix Pro, thus it is possible to cast TSQLConnection instance that referrs to very
			this driver to IInformixConnection.
		</td></tr>

		<tr><td colspan="2" height="5"></td></tr>

		<tr><td colspan="2" class="code_spacing">
			<tt><b>IInformixConnection</b> = <b>interface</b>(ISQLConnection)<br>
			&nbsp;&nbsp;<b>function</b> <font color="#009900">SQLCA</font>: PSQLCA; stdcall;<br>
			&nbsp;&nbsp;<b>function</b> <font color="#009900">ErrorMessage</font>: PChar; stdcall; overload;<br>
			&nbsp;&nbsp;<b>function</b> <font color="#009900">SetTimeOutCallback</font>(TimeOut: Integer; Callback: TimeOutCallback;<br>
			&nbsp;&nbsp;&nbsp;&nbsp;CustomData: Pointer): SQLResult; stdcall;<br>
			&nbsp;&nbsp;<b>function</b> <font color="#009900">InterruptSQL</font>: Boolean; stdcall;<br>
			&nbsp;&nbsp;<b>function</b> <font color="#009900">GetLastInsertedSerial8</font>(out Value):Boolean; stdcall;<br>
			&nbsp;&nbsp;<b>function</b> <font color="#009900">ServerVersion</font>: PChar; stdcall;<br>
			&nbsp;&nbsp;<b>function</b> <font color="#009900">IsInformixOnline</font>: Boolean;<br>
			&nbsp;&nbsp;<b>function</b> <font color="#009900">IsUniversalServer</font>: Integer;<br>
			&nbsp;&nbsp;<b>function</b> <font color="#009900">SessionID</font>: Integer;<br>
			<b>end;</b></tt>
		</td></tr>

		<tr><td colspan="2" height="10"></td></tr>

		<tr><td colspan="2" class="block_caption">IInformixConnection members specification</td></tr>

		<tr><td colspan="2" height="5"></td></tr>	

		<tr><td colspan="2">
			<tt><b>function</b> <font color="#009900">SQLCA</font></tt><br>
			&nbsp;&nbsp;- return Connection Area structure pointer.
		</td></tr>

		<tr><td colspan="2" height="5"></td></tr>	

		<tr><td colspan="2">
			<tt><b>function</b> <font color="#009900">ErrorMessage</font></tt><br>
			&nbsp;&nbsp;- text of last raised error in Connection.
		</td></tr>

		<tr><td colspan="2" height="5"></td></tr>	

		<tr><td colspan="2">
			<tt><b>function</b> <font color="#009900">SetTimeOutCallback</font></tt><br>
			&nbsp;&nbsp;- destined for callback function installation which will be called during statement exuction with specified period.
			Commonly used for prolonged user's sql query breaking.
		</td></tr>

		<tr><td colspan="2" height="5"></td></tr>	

		<tr><td colspan="2">
			<tt><b>function</b> <font color="#009900">InterruptSQL</font></tt><br>
			&nbsp;&nbsp;- breaks current sql query.
		</td></tr>

		<tr><td colspan="2" height="5"></td></tr>	

		<tr><td colspan="2">
			<tt><b>function</b> <font color="#009900">GetLastInsertedSerial8</font></tt><br>
			&nbsp;&nbsp;- returns last inserted serial8 value within current Connection.
		</td></tr>

		<tr><td colspan="2" height="5"></td></tr>	

		<tr><td colspan="2">
			<tt><b>function</b> <font color="#009900">ServerVersion</font></tt><br>
			&nbsp;&nbsp;- currently connected server's version.
		</td></tr>

		<tr><td colspan="2" height="5"></td></tr>	

		<tr><td colspan="2">
			<tt><b>function</b> <font color="#009900">IsInformixOnline</font></tt><br>
			&nbsp;&nbsp;- indicates whether Informix server belongs to the <i>Online</i> family.
		</td></tr>

		<tr><td colspan="2" height="5"></td></tr>	

		<tr><td colspan="2">
			<tt><b>function</b> <font color="#009900">IsUniversalServer</font></tt><br>
			&nbsp;&nbsp;- indicates whether Informix server belongs to the 9.xx family.
		</td></tr>

		<tr><td colspan="2" height="5"></td></tr>	

		<tr><td colspan="2">
			<tt><b>function</b> <font color="#009900">SessionID</font></tt><br>
			&nbsp;&nbsp;- connection's session ID on a database server (same as <i>onstat</i> command displays).
		</td></tr>

		<tr><td colspan="2" height="25"></td></tr>		

		<tr><td colspan="2" class="block_caption">IInformixConnection usage sample - callback routine installation</td></tr>

		<tr><td colspan="2" height="5"></td></tr>	

		<tr><td colspan="2" class="code_spacing">
			<tt><b>with</b> IInformixConnection(sqlConnection.SQLConnection) <b>do</b><br>
		    <b>begin</b><br>
		    &nbsp;&nbsp;<b>if</b> checkboxEnableInterruption.Checked <b>then</b><br>
		      &nbsp;&nbsp;&nbsp;&nbsp;Status := setTimeOutCallback(500, Callback, sqlConnection)<br>
		    &nbsp;&nbsp;<b>else</b><br>
		      &nbsp;&nbsp;&nbsp;&nbsp;Status := setTimeOutCallback(-1, nil, nil);<br>
		    &nbsp;&nbsp;<b>if</b> Status <> 0 <b>then</b><br>
		      &nbsp;&nbsp;&nbsp;&nbsp;ShowMessage(ErrorMessage);<br>
		    <b>end</b>;</tt>
		</td></tr>
	</table>
</body>

</html>
